1. Field of the Invention
The present invention relates to data processing in an information processing apparatus that transmits print data to a printing apparatus.
2. Description of the Related Art
Printer drivers managed by the operating systems (OS's) of information processing apparatuses generate print data that can be printed by printing apparatuses from drawing information supplied from the OSs and transmit the generated print data to the printing apparatuses. Users of the information processing apparatuses set, for example, the sizes of sheets used for printing, orientations, and margins of pages to the print data with driver user interfaces (UIs) provided by the printer drivers. The printer drivers add print instruction information about the sizes of the sheets, the orientations, and the margins of pages, set with the driver UIs, to the print data to be transmitted to the printing apparatuses.
The printing apparatuses usually select the sheets having the sizes indicated by the printer drivers to perform printing on the selected sheets.
However, if the print areas of documents and/or images in the print data are extremely smaller than the sizes of the sheets indicated in the print instruction information, margins of the sheets where the print data is not printed are wasted. For example, if a user selects an A3 sheet to print a one-page document that is small enough to fit in a B5 sheet on the selected A3 sheet, a blank space larger than the B5 size remains on the sheet.
In order to resolve such a problem, in methods in related art, the print areas are generally enlarged or reduced in accordance with the sizes of sheets set with the driver UIs to avoid waste of the sheets.
For example, Japanese Patent Laid-Open No. 2004-268379 discloses a printing apparatus that automatically selects a sheet optimal for print data having no page break to print the print data.
In the printing apparatus disclosed in Japanese Patent Laid-Open No. 2004-268379, a sheet having the number of printout characters most close to the optimal number of printout characters, that is, a sheet of a size having a minimum margin where the print data is not printed is selected as the sheet used for printing.
Japanese Patent Laid-Open No. 6-115208 discloses a printing apparatus capable of automatically determining an optimal size of a sheet on which resource file data including image data or form data is printed.
The printing apparatus disclosed in Japanese Patent Laid-Open No. 6-115208 detects the sizes of multiple sheets set in a sheet feeder having size information including at least information concerning the heights and widths of the sheets. The printing apparatus receives the resource file data including the image data or form data and stores the received resource file data. In order to convert the resource file data into print image data on the basis of the size information, the printing apparatus selects a smallest sheet from among the detected sheets having sizes larger than the size of the print image data, set in the sheet feeder.
However, Japanese Patent Laid-Open No. 2004-268379 describes sheet selection in processing of character data but does not describe the sheet selection in processing of image data. Pages including both the character data and the image data are not processed by the printing apparatus disclosed in Japanese Patent Laid-Open No. 2004-268379. In addition, a sheet can be selected only from the sheets set in the printing apparatus.
The printing apparatus disclosed in Japanese Patent Laid-Open No. 6-115208 can only process the image data and form data having the height and width information and a sheet can be selected only from the sheets set in the sheet feeder.
In addition, since the print data is enlarged or reduced in accordance with the sheet size in control of the sheet selection in order to minimize the margins, there is a problem in that images or texts having sizes that are not intended by users are printed.
There are cases in which users can select types of sheets used for printing in accordance with the purposes of files to be printed. Furthermore, not only plain paper but also special media, such as photographic paper or compact disc-recordables (CD-Rs), are increasingly used in printing apparatuses. Selection of sheets only on the basis of the print area causes a problem in that data can be printed on such special media that are not intended by users.